from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path, re_path

from mars.apps.realtimelog import views as realtimelog_view
from mars.apps.scheduler import views as scheduler_views  # 引入定时任务模块
from mars.apps.systems import views as systems_views

urlpatterns = (
    [
        path("admin/", admin.site.urls),
        path("dashboard/", systems_views.dashboard, name="dashboard"),
        path("oauth/", include("mars.apps.oauth.urls")),
        path("api/photo", include("mars.apps.photo.urls")),
        path("api/aliyun", include("mars.apps.aliyun.urls")),
        path("api/wechat", include("mars.apps.wechat.urls")),
        path("api/system/", include("mars.apps.systems.urls")),
        path("api/ad", include("mars.apps.advertisement.urls")),
        path('echo/', realtimelog_view.echo,name="realtimelog"),
    ]
    + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
)
